home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / games / IndiZone / sw / sw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.1 KB  |  76 lines

  1. /*
  2.  * Copyright (C) 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. #ifndef SW_H
  18. #define    SW_H
  19.  
  20. #ifndef    FALSE
  21. #define    FALSE    0
  22. #endif
  23. #ifndef    TRUE
  24. #define    TRUE    (!FALSE)
  25. #endif
  26.  
  27. #include <math.h>
  28.  
  29. #define    SERVERPORT    5701
  30. #define    BROADCASTPORT    5702
  31. #define    RADIOPORT    5703
  32.  
  33. #define    MAXPLAYERS    20            // max players at once
  34. #define    MAXMISSILES    4            // max missiles fired at once
  35. #define    MAXHITS        5            // max simultaneous visible hits
  36. #define    MAXNAMELEN    24            // max length of call sign
  37. #define    NUMTEAMS    4            // number of teams
  38.  
  39. #define    GAMEWIDTH    1000
  40. #define    PANELHEIGHT    240
  41. #define    ASPECT        (2.0/1.0)
  42. #define    HEIGHTANGLE    (M_PI/6.0)
  43. #define    HITHERPLANE    1.0
  44. #define    YONPLANE    25000.0            // 25 kilometers
  45. #define    LASERRANGE    4000.0            // 4 kilometers
  46. #define    MAXMESSAGES    20
  47. #define    NUMSTARS    500
  48. #define    MAXASTEROIDS    36
  49.  
  50. #define    FIELDSIZE    5000.0            // game field 10 km on a side
  51. #define    BASERADIUS    250.0            // 500 meter diameter
  52. #define    FLAGSIZE    10.0            // 10 meters on a side
  53.  
  54. enum Active        { ObjectInactive = 0,
  55.               ObjectActive = 1,
  56.               ObjectPaused = 2 };
  57. enum Team        { NoTeam = -1,
  58.               RedTeam = 0,
  59.               GreenTeam = 1,
  60.               BlueTeam = 2,
  61.               PurpleTeam = 3 };
  62. enum FlagState        { FlagNoExist,
  63.               FlagReady,
  64.               FlagOnShip };
  65. enum ObjectType        { LastObject = -1,
  66.               TeamBaseObject = 0,
  67.               AsteroidObject };
  68. enum ShipClass        { ShipClassRegular = 0 };
  69.  
  70. enum Weapon        { NoWeapon = -1, Laser = 0, Missile = 1 };
  71. enum            { LeftMouseButton = 0,
  72.               MiddleMouseButton = 1,
  73.               RightMouseButton = 2 };
  74.  
  75. #endif
  76.